package survey.dao.impl;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import survey.dao.QuestionnaireDao;
import survey.entity.Questionnaire;

public class QuestionnaireDaoImpl extends SqlMapClientTemplate implements QuestionnaireDao {
	private SqlMapClientTemplate sqlMapClientTemplate;

	public SqlMapClientTemplate getSqlMapClientTemplate() {
		return sqlMapClientTemplate;
	}

	public void setSqlMapClientTemplate(
			SqlMapClientTemplate sqlMapClientTemplate) {
		this.sqlMapClientTemplate = sqlMapClientTemplate;
	}

	public Questionnaire getQuestionnaire(int id) {
		return (Questionnaire) sqlMapClientTemplate.queryForObject("getQuestionnaireById", id);
	}

}
